﻿using LogicLayer;
using LogicLayer.xk;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Unity_IocDemo
{
    public class Operater
    {
        [Dependency]//需要被注入的属性标记
        public IPerson person { get; set; }
        private ICooker COOKER;
        public Operater(ICooker cooker)//构造函数将接口传入进来
        {
            COOKER = cooker;
       
        }


        public void cook() {
            COOKER.Cook();
        }
    }
}
